package com.company.proxy.type1;

/**
 * 代理角色，是真实角色的代理中介
 */
public class ProxyByStatic implements Subject {
    private Subject realObj = new RealSubject();

    @Override
    public void method1() {
        b1();
        realObj.method1();
        b2();
    }

    @Override
    public void method2() {
        b1();
        realObj.method2();
        b2();
    }

    private void b1(){
        System.out.println("业务处理1");
    }

    private void b2(){
        System.out.println("业务处理2");
    }
}
